home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Jul 90 / MacApp.Tech$ 7⁄13⁄90 / 1574-Non-scaled margins-Jul90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.7 KB  |  43 lines  |  [TEXT/GEOL]

  1. Item    1376422                         10-July-90        15:06PDT
  2.  
  3. From:   PILLAR.CORP                     Pillar, Chris Ovard,PRT
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    Non-scaled margins
  8.  
  9. I am working on an application where the user can specify margins for printed
  10. output in inches.  I would like these margins to be accurate regardless of any
  11. scaling the user specifies in the page setup dialog.  For example if the user
  12. says to allow a 1 inch margin and to scale the output 50% the output should
  13. have a 1 inch margin, not a 0.5 inch margin.  With MacApp 2.0B9 this was a
  14. simple enough thing to do, the print handler's fMarginRes field contained the
  15. number of effective pixels per inch taking into account the scaling.
  16. TStdPrintHandler.CheckPrinter calculated fMarginRes using some undocumented
  17. fields of the print record.  In 2.0 Final this magic bit of code has been
  18. commented out of TStdPrintHandler.CheckPrinter:
  19.  
  20. >{$IFC FALSE}
  21. > { This *old* computation for fMarginRes doesn't work with the current printer
  22. >   drivers, so use prInfo's iHRes & iVRes. It's conceivable that this
  23. >   computation was correct for some *older* versions of the printer drivers.
  24. >   But what versions???
  25. >   NOTE: the Print Shop recommends always using the latest version of the
  26. >   print drivers, even with older systems. }
  27. > WITH fPageAreas.thePaper, fMarginRes DO
  28. >      BEGIN
  29. >    h := (IntMultiply(iPrPgFract, right - left)) DIV prStl.iPageH;
  30. >      v := (IntMultiply(iPrPgFract, bottom - top)) DIV prStl.iPageV;
  31. >     END;
  32. >{$ENDC}
  33.  
  34. Does anyone know of a legitimate way to accurately measure the size of margins
  35. in inches?
  36.  
  37. Thanks,
  38.  
  39. Steve Curry,
  40. Pillar Corporation
  41. Pillar.Corp
  42.  
  43.